package learningThread.instance.hungry;

/**
 * 饿汉模式，项目初始化即加载，线程安全
 */
public class MyObject {

    private static MyObject instance = new MyObject();

    private MyObject() {

    }

    public static MyObject getInstance() {
        return instance;
    }
}
